package com.anycl.design.behavioral.mediator;

public class Main {

    public static void main(String[] args) {
        // 中介
        Mediator mediator = new ConcreteMediator();
        // 定义两个同事角色
        Colleague1 c1 = new Colleague1(mediator);
        Colleague2 c2 = new Colleague2(mediator);
        mediator.setC1(c1);
        mediator.setC2(c2);

        c1.depMethod1();
    }
}
